package com.gupaoedu.starter;

import com.gupaoedu.starter.format.FormatProcessor;

public class HelloFormatTemplate {

    private FormatProcessor formatProcessor;

    public HelloFormatTemplate(FormatProcessor formatProcessor) {
        this.formatProcessor = formatProcessor;
    }

    public <T> String doForma(T obj){
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("Execute format:").append("\n")
                .append("Obj format result:")
                .append(formatProcessor.format(obj))
                .append("\n");
        return stringBuilder.toString();
    }
}
